var express = require('express');
var router = express.Router();
/* GET home page. */
router.get('/test', function(req, res, next) {
  res.render('layout', { title: 'Express' });
});


router.get('/api/users/test', function(req, res, next) {
  res.json("{asdas}");
});
router.post('/api/change', function(req, res, next) {
  var postData = req.body;
  if(postData && postData.age ===20){
    console.log(postData.age)
    res.json('data is right')
  } else{
    res.json('data is err')
  }


});
module.exports = router;
